@extends('host.custom.common.common')

@section('c-head')
    <script>
        var PAGE_DATA = {
            pagingObj : {
                total : 0,
                perpage : 7,
                page : 1
            }
        };
    </script>
@stop

@section('body')
        <!-- top_test -->
    <div id="top_test"></div>

    <!-- web_logo_search -->
    <div id="web_logo_search"></div>

    <!-- comm_nav -->
    <div id="comm_nav"></div>

    <div class="com-w mt20">
        <div class="wrapper clearfix">
            <div id="commleftmenu" class="w220 mr20 comm-left-menu">
                <div class="menu-top-title">采购商中心</div>
                <div id="leftmenuitems"></div>
            </div>
            <div class="w960 comm-main">
                <div class="main-release clearfix">
                    <div class="main-release-nav">
                        您当前的位置：
                        <a href="javascript:void(0)">首页</a>
                        >
                        <a href="javascript:void(0)">采购商中心</a>
                        > 退换货记录
                    </div>
                    <div class="main-release-title">
                        <span class="icons"></span>
                        <span class="release-title-h3 f16">退换货记录</span>
                    </div>
                    <div class="main-release-from">
                        <div id="commTabs_1" class="comm-tabs">
                            <div class="comm-tabs-head">
                                <div class="head-item current">退货记录</div>
                                <div class="head-item">换货记录</div>
                            </div>
                            <div class="comm-tabs-body">
                                <!-- 1 -->
                                <div class="body-item current">
                                    <div class="h60 w960 return-shop-list">
                                        <div class="closing-time f14">
                                            <input type="text" placeholder="订单编号/商品名称" id="ordernum" value="">
                                            申请时间：
                                            <input type="text" id="starttime" value="" readonly />
                                            -
                                            <input type="text" id="endtime" value="" readonly />
                                            状态：
                                            <select id="status">
                                                <option value="">全部</option>
                                                <option value="1">等待买家确认</option>
                                                <option value="2">等待卖家审批</option>
                                            </select>
                                            <a href="javascript:void(0)" class="btn btn-warn btn-w70x32" id="search">搜索</a>
                                        </div>
                                    </div>
                                    <div class="consult-center mt20">
                                        <div class="head">
                                            <ul class="clearfix">
                                                <li class="wb15">退货编号</li>
                                                <li class="wb15">订单编号</li>
                                                <li class="wb15">商品名称</li>
                                                <li class="wb10">退货数量</li>
                                                <li class="wb15">申请时间</li>
                                                <li class="wb10">状态</li>
                                                <li class="wb20">操作</li>
                                            </ul>
                                        </div>
                                        <div class="consult-main clearfix" >
                                            <div id="commTabs_1_body"></div>
                                            <div id="returngoods-paging" class="comm-paging mt2" style="float: right;" >

                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- 2 -->
                                <div class="body-item">
                                    <div class="h60 w960 return-shop-list">
                                        <div class="closing-time f14">
                                            <input type="text" placeholder="订单编号/商品名称" id="hhordernum" value="">
                                            申请时间：
                                            <input type="text" id="hhstarttime" value="" readonly />
                                            -
                                            <input type="text" id="hhendtime" value="" readonly />
                                            状态：
                                            <select id="hhstatus">
                                                <option value="">全部</option>
                                                <option value="1">等待买家确认</option>
                                                <option value="2">等待卖家审批</option>
                                            </select>
                                            <a href="javascript:void(0)" class="btn btn-warn btn-w70x32" id="hhsearch">搜索</a>
                                        </div>
                                    </div>
                                    <div class="consult-center mt20">
                                        <div class="head">
                                            <ul class="clearfix">
                                                <li class="wb15">退货编号</li>
                                                <li class="wb15">订单编号</li>
                                                <li class="wb15">商品名称</li>
                                                <li class="wb10">退货数量</li>
                                                <li class="wb15">申请时间</li>
                                                <li class="wb10">状态</li>
                                                <li class="wb20">操作</li>
                                            </ul>
                                        </div>
                                        <div class="consult-main clearfix">
                                            <div id="commTabs_2_body"></div>
                                            <div id="changegoods-paging" class="comm-paging mt2" style="float: right;" >

                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- foot_nav -->
    <div id="foot_nav"></div>

    <div id="bottom_main"></div>
    <!-- 退货记录模板 -->
    <script type="text/template" id="returngoods-template">
        <%_.each(obj, function(item){%>
        <ul class="clearfix" data-id="<%=item.id %>
                ">
            <li class="wb15 f14 b002 tc">
                <%=item.returnnum %></li>
            <li class="wb15 c-666">
                <%=item.ordernum %></li>
            <li class="wb15">
                <%=item.proname %></li>
            <li class="wb10 tc">
                <%=item.num %></li>
            <li class="wb15 tc">
                <%=item.time %></li>
            <li class="wb10">
                <%=item.status %></li>
            <li class="wb20">
                <% if(item.status == '等待买家确认'){ %>
                <div class="mt20">
                    <span class="btn btn-default btn-w70x32">查看</span>
                    <span class="btn btn-warn" id="qrsk">确认收款</span>
                </div>
                <%} %>

                <% if(item.status == '等待卖家审批' || item.status == '等待卖家收货'){ %>
                <div class="mt20">
                    <span class="btn btn-default btn-w70x32">查看</span>
                </div>
                <%} %>

                <% if(item.status == '等待买家退货'){ %>
                <div class="mt20">
                    <span class="btn btn-default btn-w70x32">查看</span>
                    <span class="btn btn-warn btn-w70x32" id="th">退货</span>
                </div>
                <%} %></li>
        </ul>
        <%});%>
    </script>
    <!-- 确认框收款 -->
    <script type="text/template" id="item-confirm">
        <div class="dialog-div">
            <div style="color:red;">确认收到款?</div>
            <div class="price-game-btn">
                <span class="btn btn-gray btn-w140x40 remove">取消</span>
                <span class="btn btn-warn btn-w140x40" id="tj">确定</span>
            </div>
        </div>
    </script>
    <!-- 确认框收货框 -->
    <script type="text/template" id="good-confirm">
        <div class="dialog-div">
            <div style="color:red;">确认收到货?</div>
            <div class="price-game-btn">
                <span class="btn btn-gray btn-w140x40 remove">取消</span>
                <span class="btn btn-warn btn-w140x40" id="tj">确定</span>
            </div>
        </div>
    </script>
    <!-- 换货的模板 -->
    <script type="text/template" id="changegood-template">
        <%_.each(obj, function(item){%>
        <ul class="clearfix" data-id="<%=item.id %>">
            <li class="wb15 f14 b002 tc"><%=item.returnnum %></li>
            <li class="wb15 c-666"><%=item.ordernum %></li>
            <li class="wb15">
                <%=item.proname %>
            </li>
            <li class="wb10 tc"><%=item.num %></li>
            <li class="wb15 tc"><%=item.time %></li>
            <li class="wb10"><%=item.status %></li>
            <li class="wb20">
                <% if(item.status == '等待买家确认'){ %>
                <div class="mt20">
                    <span class="btn btn-default btn-w70x32">查看</span>
                    <span class="btn btn-warn" id="qrsh">确认收货</span>
                </div>
                <%} %>

                <% if(item.status == '等待卖家审批' || item.status == '等待卖家收货'){ %>
                <div class="mt20">
                    <span class="btn btn-default btn-w70x32">查看</span>
                </div>
                <%} %>

                <% if(item.status == '等待买家退货'){ %>
                <div class="mt20">
                    <span class="btn btn-default btn-w70x32">查看</span>
                    <span class="btn btn-warn btn-w70x32" id="hh">换货</span>
                </div>
                <%} %>
            </li>
        </ul>
        <%});%></script>
    <!-- 退货弹出框 -->
    <script type="text/template" id="item-dialog">
        <div class="clearfix">
            <form id="form" method="post" action="">
                <div class="dialog-div wbb clearfix">
                    <div class="dialog-div-l">物流公司：</div>
                    <div class="dialog-div-r">
                        <input type="text" class="input" id="compay" name="compay"></div>
                </div>
                <div class="dialog-div wbb clearfix">
                    <div class="dialog-div-l">运单号：</div>
                    <div class="dialog-div-r">
                        <input type="text" class="input" id="waybillnumber" name="waybillnumber"></div>
                </div>
                <div class="dialog-div wbb clearfix">
                    <div class="dialog-div-l">发货人：</div>
                    <div class="dialog-div-r">
                        <input type="text" class="input" id="consignee" name="consignee"></div>
                </div>
                <div class="dialog-div wbb clearfix">
                    <div class="dialog-div-l">联系电话：</div>
                    <div class="dialog-div-r">
                        <input type="text" class="input" id="tel" name="tel"></div>
                </div>
                <div class="dialog-div" style="margin-top: 35px;">
                    <div class="clearfix fl" style="margin-left: 90px;">
                        <span class="btn btn-gray btn-w140x40 lh32" i="close" style="color: #fff">取消</span>
                    </div>
                    <div class="clearfix fl ml20">
                        <input type="button" value="提交" class="btn btn-warn btn-w140x40" id="info"></div>
                </div>
            </form>
        </div>
    </script>

    <link rel="stylesheet" href="/assets/b2b/css/jquery-ui.min.css">
    <script src="/assets/b2b/js/libs/jquery-ui.min.js"></script>
    <script src="/assets/b2b/js/libs/jquery.validate.min.js"></script>
    <script src="/assets/b2b/js/libs/messages_zh.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/dialog-min.js"></script>
    <script src="/assets/b2b/js/libs/jquery.paging.min.js"></script>
    <script src="/assets/b2b/js/pageModules/buyer/B9.js"></script>
@stop